<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="/static/css/layui.css">
</head>
<body>
<div style="width: 800px;height: 400px; margin: 20px auto;">
    <table lay-filter="demo">
  <thead>
    <tr>
      <th lay-data="{field:'Sno'}">编号</th>
      <th lay-data="{field:'Sname'}">姓名</th>
      <th lay-data="{field:'Ssex'}">性别</th>
      <th lay-data="{field:'Sage'}">年龄</th>
      <th lay-data="{field:'Dno'}">所属院系</th>
      <th lay-data="{field:'Sclass'}">班级</th>
      <th lay-data="{field:'address'}">住址</th>
      <th lay-data="{field:'operation'}">操作</th>
    </tr>
  </thead>
  <tbody>
  {% for std in students_list %}
    <tr>
      <td>{{ std.Sno }}</td>
      <td>{{ std.Sname }}</td>
      <td>{{ std.Ssex }}</td>
      <td>{{ std.Sage }}</td>
      <td>{{ std.Dno }}</td>
      <td>{{ std.Sclass }}</td>
      <td>{{ std.address }}</td>
      <td>
          <a href="/delete/{{ std.Sname }}" class="layui-btn-sm">删除</a>
          <a href="/change/{{ std.Sname }}" class="layui-btn-sm">编辑</a>
      </td>
    </tr>
  {% endfor %}
  </tbody>
</table>
    <a href="/add" class="layui-btn">添加</a>
</div>
<script src="/static/layui.js"></script>
<script>
//Demo
layui.use('form', function(){
  var table = layui.table;

//转换静态表格
table.init('demo', {
  height: 315 //设置高度
  ,limit: 100 //注意：请务必确保 limit 参数（默认：100）是与你服务端限定的数据条数一致
  //支持所有基础参数
});
});
</script>
</body>
</html>